package mysql

import "gorm.io/gorm"

type Reservation struct {
	gorm.Model
	UserId          int64  `gorm:"type:int(11)" json:"userId,omitempty"`
	HouseId         int64  `gorm:"type:int(11)" json:"houseId,omitempty"`
	ReservationTime string `gorm:"type:varchar(30)" json:"reservationTime,omitempty"`
	ReservationSn   string `gorm:"type:varchar(50)" json:"reservationSn,omitempty"`
}

func (r *Reservation) Create() error {
	return DB.Create(&r).Error
}
